﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Electronic_work_order.Model
{
    public class Ordering
    {
        //订餐流程
        [Key]
        public int OrderID { get; set; }  //订餐申请编号

        public DateTime Otime { get; set; } //申请日期  当前时间

        public int OrderStateID { get; set; }

        [ForeignKey("OrderStateID")]
        public virtual OrderState OrderState { get; set; } //状态 晚餐 午餐

        public int OrganizationID { get; set; }

        [ForeignKey("OrganizationID")]
        public virtual Organization Organization { get; set; } //部门编号  --部门名称

        public string OrName { get; set; } //  --申请人

        public int Manager_id { get; set; }  //审核人

        public string Agency_ID { get; set; }

        // public DateTime closing_time { get; set; } //预计下班时间

        public int MealID { get; set; }

        [ForeignKey("MealID")]
        public virtual Set_meal Set_meal { get; set; }  // 套餐编号  --套餐名称

        public int Process_State_ID { get; set; }//外键审核表

        [ForeignKey("Process_State_ID")]
        public virtual Process_application_State Process_Application_State { get; set; }

        [ForeignKey("Aid")]
        public int Aid { get; set; }//申请类型态表
        public virtual application Application { get; set; }
    }
}
